package com.atguigu.newmvc.exception;

import lombok.Data;

@Data
public class BusException extends RuntimeException{
    private Integer code;
    private String message;

    public BusException(Integer code,String message){
        this.code=code;
        this.message=message;
    }

    public BusException(BusExceptionEnum busExceptionEnum){
        this.code=busExceptionEnum.getCode();
        this.message= busExceptionEnum.getMessage();
    }

}
